<template>
  <div class="cart-list">
    <scroll class="content" ref="scroll" :probe-type="3"  :pull-up-load="true">
         <cart-list-item v-for="(item,index) in cartList" :key="index" :item="item"/>
    </scroll>
  </div>
</template>
<script>
//子组件
import CartListItem from './CartListItem'
//公共组件
import Scroll from  'components/common/scroll/Scroll'
export default {
  name: 'Cartlist',
  components: { 
     CartListItem,
     Scroll
   },
  computed: {
     cartList(){
       return this.$store.state.cartList
     }
   },
  activated() {
      this.$refs.scroll.scroll.refresh()
  },
  directives: {  },
  data() {
    return {
      
    };
  },
  mounted() {
    
  },
  methods: {
    
  },
};
</script>
<style scoped>
.cart-list{
  height: calc(100% - 93px - 40px);
}
  .content{
  /* 还可以使用定位来确定内容的高度~ */
  margin-top:44px;
  height:100%;
  overflow: hidden;
}
</style>